//
//  TNRateTableViewCell.m
//  TravelNotes
//
//  Created by 黄锋 on 15/8/13.
//  Copyright (c) 2015年 王浩宇. All rights reserved.
//

#import "TNRateTableViewCell.h"
#import "Macro.h"

@implementation TNRateTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        _pic = [[UIImageView alloc] initWithFrame:CGRectMake(20, 20, 40, 40)];
        _pic.layer.masksToBounds = YES;
        _pic.layer.cornerRadius = 10;
        [self.contentView addSubview:_pic];
        _name = [[UILabel alloc] initWithFrame:CGRectMake(70, 20, 60, 40)];
        _name.font = [UIFont systemFontOfSize:25];
        [self.contentView addSubview:_name];
        _textField = [[UITextField alloc] initWithFrame:CGRectMake(150, 20, SCREEN_WIDTH - 170, 40)];
        _textField.text = @"0.00";
        _textField.font = [UIFont  fontWithName:@"Helvetica-Bold" size:25];
        _textField.adjustsFontSizeToFitWidth = YES;
        _textField.minimumFontSize = 12;
        _textField.textAlignment = NSTextAlignmentRight;
        _textField.keyboardType = UIKeyboardTypeDecimalPad;
        [self.contentView addSubview:_textField];
        _money = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - 70, 60, 50, 10)];
        _money.font = [UIFont systemFontOfSize:10];
        _money.textAlignment = NSTextAlignmentRight;
        [self.contentView addSubview:_money];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return self;
}

@end
